<?php
namespace System;

define("SYSTEM_PATH", ROOT_PATH . "/Include");

class Factory {
    public static function doRequire($name) {
        //require_once SYSTEM_PATH . "/" . $name . ".php";
    }
    
    public static function create($name) {
        switch ($name) {
            case "Route":
                self::doRequire("Entity/" . $name);
                return new Entity\Route();
                break;
            case "Router":
                self::doRequire($name);
                return new Router();
                break;
            case "PageLoader":
                self::doRequire($name);
                return new PageLoader();
                break;
            case "FrontController":
                self::doRequire($name);
                return new FrontController();
                break;
        }
    }
    
}